<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"  
  "http://www.w3.org/TR/html4/loose.dtd">  
<html > 
<head><title>Segmentation</title> 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> 
<meta name="generator" content="TeX4ht (http://www.cse.ohio-state.edu/~gurari/TeX4ht/)"> 
<meta name="originator" content="TeX4ht (http://www.cse.ohio-state.edu/~gurari/TeX4ht/)"> 
<!-- html,4,subsubsections+ --> 
<meta name="src" content="CookBook.tex"> 
<meta name="date" content="2012-10-02 23:16:00"> 
<link rel="stylesheet" type="text/css" href="CookBook.css"> 
</head><body 
>
<!--l. 4555-->
<h4 class="subsectionHead"><span class="titlemark">4.9.3    </span> <a 
 id="x112-5990004.9.3"></a>Segmentation</h4>
<!--l. 4556--><p class="noindent" >Performs segmentation of an image, and output either a raster or a vector file. In vector mode, large input
datasets are supported.
<h5 class="subsubsectionHead"><a 
 id="x112-6000004.9.3"></a>Detailed description</h5>
<!--l. 4558--><p class="noindent" >This application allows to perform various segmentation algorithms on an multispectral image.Available
segmentation algorithms are two different versions of Mean-Shift segmentation algorithm (one being
multi-threaded), simple pixel based connected components according to a user-defined criterion, and
watershed from the gradient of the intensity (norm of spectral bands vector). The application has two
different modes that affects the nature of its output.<br 
class="newline" /><br 
class="newline" />In raster mode, the output of the application is a classical image of unique labels identifying the segmented
                                                                            
                                                                            
regions. The labeled output can be passed to the ColorMapping application to render regions with
contrasted colors. Please note that this mode loads the whole input image into memory, and as such can
not handle large images. <br 
class="newline" /><br 
class="newline" />To segment large data, one can use the vector mode. In this case, the output of the application is a
vector file or database. The input image is split into tiles (whose size can be set using the tilesize
parameter), and each tile is loaded, segmented with the chosen algorithm, vectorized, and written
into the output file or database. This piece-wise behavior ensure that memory will never get
overloaded, and that images of any size can be processed. There are few more options in the vector
mode. The simplify option allows to simplify the geometry (i.e. remove nodes in polygons)
according to a user-defined tolerance. The stitch option allows to application to try to stitch
together polygons corresponding to segmented region that may have been split by the tiling
scheme.
<h5 class="subsubsectionHead"><a 
 id="x112-6010004.9.3"></a>Parameters</h5>
<!--l. 4560--><p class="noindent" >This section describes in details the parameters available for this application. Table&#x00A0;<a 
href="#x112-60100150">4.50<!--tex4ht:ref: Segmentation_param_table --></a>, page&#x00A0;<a 
href="#x112-60100150">516<!--tex4ht:ref: Segmentation_param_table --></a>
presents a summary of these parameters and the parameters keys to be used in command-line and
programming languages. Application key is <span class="obeylines-h"><span class="verb"><span 
class="pcrr7tn-">Segmentation</span></span></span>. <div class="table">
                                                                            
                                                                            
<!--l. 4561--><p class="noindent" ><a 
 id="x112-60100150"></a><hr class="float"><div class="float" 
>
                                                                            
                                                                            
<div class="center" 
>
<!--l. 4562--><p class="noindent" >
<div class="tabular"> <table id="TBL-50" class="tabular" 
cellspacing="0" cellpadding="0" rules="groups" 
><colgroup id="TBL-50-1g"><col 
id="TBL-50-1"></colgroup><colgroup id="TBL-50-2g"><col 
id="TBL-50-2"></colgroup><colgroup id="TBL-50-3g"><col 
id="TBL-50-3"></colgroup><tr 
class="hline"><td><hr></td><td><hr></td><td><hr></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-50-1-"><td  style="white-space:wrap; text-align:left;" id="TBL-50-1-1"  
class="td11"><!--l. 4566--><p class="noindent" ><span 
class="ptmr7t-x-x-90">Parameter key</span>                                                </td><td  style="white-space:nowrap; text-align:left;" id="TBL-50-1-2"  
class="td11"><span 
class="ptmr7t-x-x-90">Parameter type    </span></td><td  style="white-space:wrap; text-align:left;" id="TBL-50-1-3"  
class="td11"><!--l. 4566--><p class="noindent" ><span 
class="ptmr7t-x-x-90">Parameter description</span>                                    </td>
</tr><tr 
class="hline"><td><hr></td><td><hr></td><td><hr></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-50-2-"><td  style="white-space:wrap; text-align:left;" id="TBL-50-2-1"  
class="td11"><!--l. 4568--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span 
class="pcrr7tn-x-x-90">in</span></span></span>                                 </td><td  style="white-space:nowrap; text-align:left;" id="TBL-50-2-2"  
class="td11"><span 
class="ptmr7t-x-x-90">Input image         </span></td><td  style="white-space:wrap; text-align:left;" id="TBL-50-2-3"  
class="td11"><!--l. 4568--><p class="noindent" ><span 
class="ptmr7t-x-x-90">Input Image</span>                                                   </td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-50-3-"><td  style="white-space:wrap; text-align:left;" id="TBL-50-3-1"  
class="td11"><!--l. 4569--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span 
class="pcrr7tn-x-x-90">filter</span></span></span>                             </td><td  style="white-space:nowrap; text-align:left;" id="TBL-50-3-2"  
class="td11"><span 
class="ptmr7t-x-x-90">Choices               </span></td><td  style="white-space:wrap; text-align:left;" id="TBL-50-3-3"  
class="td11"><!--l. 4569--><p class="noindent" ><span 
class="ptmr7t-x-x-90">Segmentation algorithm</span>                                </td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-50-4-"><td  style="white-space:wrap; text-align:left;" id="TBL-50-4-1"  
class="td11"><!--l. 4570--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span 
class="pcrr7tn-x-x-90">filter</span><span 
class="pcrr7tn-x-x-90">&#x00A0;meanshift</span></span></span>                   </td><td  style="white-space:nowrap; text-align:left;" id="TBL-50-4-2"  
class="td11"><span 
class="ptmri7t-x-x-90">Choice                 </span></td><td  style="white-space:wrap; text-align:left;" id="TBL-50-4-3"  
class="td11"><!--l. 4570--><p class="noindent" ><span 
class="ptmr7t-x-x-90">Mean-Shift</span>                                                    </td></tr><tr  
 style="vertical-align:baseline;" id="TBL-50-5-"><td  style="white-space:wrap; text-align:left;" id="TBL-50-5-1"  
class="td11"><!--l. 4571--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span 
class="pcrr7tn-x-x-90">filter</span><span 
class="pcrr7tn-x-x-90">&#x00A0;edison</span></span></span> </td><td  style="white-space:nowrap; text-align:left;" id="TBL-50-5-2"  
class="td11"><span 
class="ptmri7t-x-x-90">Choice </span></td><td  style="white-space:wrap; text-align:left;" id="TBL-50-5-3"  
class="td11"><!--l. 4571--><p class="noindent" ><span 
class="ptmr7t-x-x-90">Edison mean-shift</span></td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-50-6-"><td  style="white-space:wrap; text-align:left;" id="TBL-50-6-1"  
class="td11"><!--l. 4572--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span 
class="pcrr7tn-x-x-90">filter</span><span 
class="pcrr7tn-x-x-90">&#x00A0;cc</span></span></span>                          </td><td  style="white-space:nowrap; text-align:left;" id="TBL-50-6-2"  
class="td11"><span 
class="ptmri7t-x-x-90">Choice                 </span></td><td  style="white-space:wrap; text-align:left;" id="TBL-50-6-3"  
class="td11"><!--l. 4572--><p class="noindent" ><span 
class="ptmr7t-x-x-90">Connected components</span>                                 </td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-50-7-"><td  style="white-space:wrap; text-align:left;" id="TBL-50-7-1"  
class="td11"><!--l. 4573--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span 
class="pcrr7tn-x-x-90">filter</span><span 
class="pcrr7tn-x-x-90">&#x00A0;watershed</span></span></span>                   </td><td  style="white-space:nowrap; text-align:left;" id="TBL-50-7-2"  
class="td11"><span 
class="ptmri7t-x-x-90">Choice                 </span></td><td  style="white-space:wrap; text-align:left;" id="TBL-50-7-3"  
class="td11"><!--l. 4573--><p class="noindent" ><span 
class="ptmr7t-x-x-90">Watershed</span>                                                      </td></tr><tr  
 style="vertical-align:baseline;" id="TBL-50-8-"><td  style="white-space:wrap; text-align:left;" id="TBL-50-8-1"  
class="td11"><!--l. 4574--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span 
class="pcrr7tn-x-x-90">filter.meanshift.spatialr</span></span></span> </td><td  style="white-space:nowrap; text-align:left;" id="TBL-50-8-2"  
class="td11"><span 
class="ptmr7t-x-x-90">Int </span></td><td  style="white-space:wrap; text-align:left;" id="TBL-50-8-3"  
class="td11"><!--l. 4574--><p class="noindent" ><span 
class="ptmr7t-x-x-90">Spatial radius</span></td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-50-9-"><td  style="white-space:wrap; text-align:left;" id="TBL-50-9-1"  
class="td11"><!--l. 4575--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span 
class="pcrr7tn-x-x-90">filter.meanshift.ranger</span></span></span>            </td><td  style="white-space:nowrap; text-align:left;" id="TBL-50-9-2"  
class="td11"><span 
class="ptmr7t-x-x-90">Float                    </span></td><td  style="white-space:wrap; text-align:left;" id="TBL-50-9-3"  
class="td11"><!--l. 4575--><p class="noindent" ><span 
class="ptmr7t-x-x-90">Range radius</span>                                                  </td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-50-10-"><td  style="white-space:wrap; text-align:left;" id="TBL-50-10-1"  
class="td11"><!--l. 4576--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span 
class="pcrr7tn-x-x-90">filter.meanshift.thres</span></span></span>             </td><td  style="white-space:nowrap; text-align:left;" id="TBL-50-10-2"  
class="td11"><span 
class="ptmr7t-x-x-90">Float                    </span></td><td  style="white-space:wrap; text-align:left;" id="TBL-50-10-3"  
class="td11"><!--l. 4576--><p class="noindent" ><span 
class="ptmr7t-x-x-90">Mode convergence threshold</span>                         </td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-50-11-"><td  style="white-space:wrap; text-align:left;" id="TBL-50-11-1"  
class="td11"><!--l. 4577--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span 
class="pcrr7tn-x-x-90">filter.meanshift.maxiter</span></span></span>           </td><td  style="white-space:nowrap; text-align:left;" id="TBL-50-11-2"  
class="td11"><span 
class="ptmr7t-x-x-90">Int                        </span></td><td  style="white-space:wrap; text-align:left;" id="TBL-50-11-3"  
class="td11"><!--l. 4577--><p class="noindent" ><span 
class="ptmr7t-x-x-90">Maximum number of iterations</span>                     </td></tr><tr  
 style="vertical-align:baseline;" id="TBL-50-12-"><td  style="white-space:wrap; text-align:left;" id="TBL-50-12-1"  
class="td11"><!--l. 4578--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span 
class="pcrr7tn-x-x-90">filter.meanshift.minsize</span></span></span> </td><td  style="white-space:nowrap; text-align:left;" id="TBL-50-12-2"  
class="td11"><span 
class="ptmr7t-x-x-90">Int </span></td><td  style="white-space:wrap; text-align:left;" id="TBL-50-12-3"  
class="td11"><!--l. 4578--><p class="noindent" ><span 
class="ptmr7t-x-x-90">Minimum region size</span></td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-50-13-"><td  style="white-space:wrap; text-align:left;" id="TBL-50-13-1"  
class="td11"><!--l. 4579--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span 
class="pcrr7tn-x-x-90">filter.edison.spatialr</span></span></span>             </td><td  style="white-space:nowrap; text-align:left;" id="TBL-50-13-2"  
class="td11"><span 
class="ptmr7t-x-x-90">Int                        </span></td><td  style="white-space:wrap; text-align:left;" id="TBL-50-13-3"  
class="td11"><!--l. 4579--><p class="noindent" ><span 
class="ptmr7t-x-x-90">Spatial radius</span>                                                 </td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-50-14-"><td  style="white-space:wrap; text-align:left;" id="TBL-50-14-1"  
class="td11"><!--l. 4580--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span 
class="pcrr7tn-x-x-90">filter.edison.ranger</span></span></span>               </td><td  style="white-space:nowrap; text-align:left;" id="TBL-50-14-2"  
class="td11"><span 
class="ptmr7t-x-x-90">Float                    </span></td><td  style="white-space:wrap; text-align:left;" id="TBL-50-14-3"  
class="td11"><!--l. 4580--><p class="noindent" ><span 
class="ptmr7t-x-x-90">Range radius</span>                                                  </td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-50-15-"><td  style="white-space:wrap; text-align:left;" id="TBL-50-15-1"  
class="td11"><!--l. 4581--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span 
class="pcrr7tn-x-x-90">filter.edison.minsize</span></span></span>              </td><td  style="white-space:nowrap; text-align:left;" id="TBL-50-15-2"  
class="td11"><span 
class="ptmr7t-x-x-90">Int                        </span></td><td  style="white-space:wrap; text-align:left;" id="TBL-50-15-3"  
class="td11"><!--l. 4581--><p class="noindent" ><span 
class="ptmr7t-x-x-90">Minimum region size</span>                                    </td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-50-16-"><td  style="white-space:wrap; text-align:left;" id="TBL-50-16-1"  
class="td11"><!--l. 4582--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span 
class="pcrr7tn-x-x-90">filter.edison.scale</span></span></span>                </td><td  style="white-space:nowrap; text-align:left;" id="TBL-50-16-2"  
class="td11"><span 
class="ptmr7t-x-x-90">Float                    </span></td><td  style="white-space:wrap; text-align:left;" id="TBL-50-16-3"  
class="td11"><!--l. 4582--><p class="noindent" ><span 
class="ptmr7t-x-x-90">Scale factor</span>                                                    </td></tr><tr  
 style="vertical-align:baseline;" id="TBL-50-17-"><td  style="white-space:wrap; text-align:left;" id="TBL-50-17-1"  
class="td11"><!--l. 4583--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span 
class="pcrr7tn-x-x-90">filter.cc.expr</span></span></span> </td><td  style="white-space:nowrap; text-align:left;" id="TBL-50-17-2"  
class="td11"><span 
class="ptmr7t-x-x-90">String </span></td><td  style="white-space:wrap; text-align:left;" id="TBL-50-17-3"  
class="td11"><!--l. 4583--><p class="noindent" ><span 
class="ptmr7t-x-x-90">Condition</span></td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-50-18-"><td  style="white-space:wrap; text-align:left;" id="TBL-50-18-1"  
class="td11"><!--l. 4584--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span 
class="pcrr7tn-x-x-90">filter.watershed.threshold</span></span></span>         </td><td  style="white-space:nowrap; text-align:left;" id="TBL-50-18-2"  
class="td11"><span 
class="ptmr7t-x-x-90">Float                    </span></td><td  style="white-space:wrap; text-align:left;" id="TBL-50-18-3"  
class="td11"><!--l. 4584--><p class="noindent" ><span 
class="ptmr7t-x-x-90">Depth Threshold</span>                                            </td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-50-19-"><td  style="white-space:wrap; text-align:left;" id="TBL-50-19-1"  
class="td11"><!--l. 4585--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span 
class="pcrr7tn-x-x-90">filter.watershed.level</span></span></span>             </td><td  style="white-space:nowrap; text-align:left;" id="TBL-50-19-2"  
class="td11"><span 
class="ptmr7t-x-x-90">Float                    </span></td><td  style="white-space:wrap; text-align:left;" id="TBL-50-19-3"  
class="td11"><!--l. 4585--><p class="noindent" ><span 
class="ptmr7t-x-x-90">Flood Level</span>                                                   </td></tr><tr  
 style="vertical-align:baseline;" id="TBL-50-20-"><td  style="white-space:wrap; text-align:left;" id="TBL-50-20-1"  
class="td11"><!--l. 4586--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span 
class="pcrr7tn-x-x-90">mode</span></span></span> </td><td  style="white-space:nowrap; text-align:left;" id="TBL-50-20-2"  
class="td11"><span 
class="ptmr7t-x-x-90">Choices </span></td><td  style="white-space:wrap; text-align:left;" id="TBL-50-20-3"  
class="td11"><!--l. 4586--><p class="noindent" ><span 
class="ptmr7t-x-x-90">Processing mode</span></td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-50-21-"><td  style="white-space:wrap; text-align:left;" id="TBL-50-21-1"  
class="td11"><!--l. 4587--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span 
class="pcrr7tn-x-x-90">mode</span><span 
class="pcrr7tn-x-x-90">&#x00A0;vector</span></span></span>                        </td><td  style="white-space:nowrap; text-align:left;" id="TBL-50-21-2"  
class="td11"><span 
class="ptmri7t-x-x-90">Choice                 </span></td><td  style="white-space:wrap; text-align:left;" id="TBL-50-21-3"  
class="td11"><!--l. 4587--><p class="noindent" ><span 
class="ptmr7t-x-x-90">Tile-based   large-scale   segmentation   with</span>
<span 
class="ptmr7t-x-x-90">vector output</span>                                                  </td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-50-22-"><td  style="white-space:wrap; text-align:left;" id="TBL-50-22-1"  
class="td11"><!--l. 4588--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span 
class="pcrr7tn-x-x-90">mode</span><span 
class="pcrr7tn-x-x-90">&#x00A0;raster</span></span></span>                        </td><td  style="white-space:nowrap; text-align:left;" id="TBL-50-22-2"  
class="td11"><span 
class="ptmri7t-x-x-90">Choice                 </span></td><td  style="white-space:wrap; text-align:left;" id="TBL-50-22-3"  
class="td11"><!--l. 4588--><p class="noindent" ><span 
class="ptmr7t-x-x-90">Standard  segmentation  with  labeled  raster</span>
<span 
class="ptmr7t-x-x-90">output</span>                                                            </td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-50-23-"><td  style="white-space:wrap; text-align:left;" id="TBL-50-23-1"  
class="td11"><!--l. 4589--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span 
class="pcrr7tn-x-x-90">mode.vector.out</span></span></span>                    </td><td  style="white-space:nowrap; text-align:left;" id="TBL-50-23-2"  
class="td11"><span 
class="ptmr7t-x-x-90">Output File name</span></td><td  style="white-space:wrap; text-align:left;" id="TBL-50-23-3"  
class="td11"><!--l. 4589--><p class="noindent" ><span 
class="ptmr7t-x-x-90">Output vector file</span>                                           </td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-50-24-"><td  style="white-space:wrap; text-align:left;" id="TBL-50-24-1"  
class="td11"><!--l. 4590--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span 
class="pcrr7tn-x-x-90">mode.vector.outmode</span></span></span>                </td><td  style="white-space:nowrap; text-align:left;" id="TBL-50-24-2"  
class="td11"><span 
class="ptmr7t-x-x-90">Choices               </span></td><td  style="white-space:wrap; text-align:left;" id="TBL-50-24-3"  
class="td11"><!--l. 4590--><p class="noindent" ><span 
class="ptmr7t-x-x-90">Writing mode for the output vector file</span>         </td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-50-25-"><td  style="white-space:wrap; text-align:left;" id="TBL-50-25-1"  
class="td11"><!--l. 4591--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span 
class="pcrr7tn-x-x-90">mode.vector.outmode</span><span 
class="pcrr7tn-x-x-90">&#x00A0;ulco</span></span></span>           </td><td  style="white-space:nowrap; text-align:left;" id="TBL-50-25-2"  
class="td11"><span 
class="ptmri7t-x-x-90">Choice                 </span></td><td  style="white-space:wrap; text-align:left;" id="TBL-50-25-3"  
class="td11"><!--l. 4591--><p class="noindent" ><span 
class="ptmr7t-x-x-90">Update  output  vector  file,  only  allow  to</span>
<span 
class="ptmr7t-x-x-90">create new layers</span>                                           </td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-50-26-"><td  style="white-space:wrap; text-align:left;" id="TBL-50-26-1"  
class="td11"><!--l. 4592--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span 
class="pcrr7tn-x-x-90">mode.vector.outmode</span><span 
class="pcrr7tn-x-x-90">&#x00A0;ovw</span></span></span>            </td><td  style="white-space:nowrap; text-align:left;" id="TBL-50-26-2"  
class="td11"><span 
class="ptmri7t-x-x-90">Choice                 </span></td><td  style="white-space:wrap; text-align:left;" id="TBL-50-26-3"  
class="td11"><!--l. 4592--><p class="noindent" ><span 
class="ptmr7t-x-x-90">Overwrite output vector file if existing.</span>        </td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-50-27-"><td  style="white-space:wrap; text-align:left;" id="TBL-50-27-1"  
class="td11"><!--l. 4593--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span 
class="pcrr7tn-x-x-90">mode.vector.outmode</span><span 
class="pcrr7tn-x-x-90">&#x00A0;ulovw</span></span></span>          </td><td  style="white-space:nowrap; text-align:left;" id="TBL-50-27-2"  
class="td11"><span 
class="ptmri7t-x-x-90">Choice                 </span></td><td  style="white-space:wrap; text-align:left;" id="TBL-50-27-3"  
class="td11"><!--l. 4593--><p class="noindent" ><span 
class="ptmr7t-x-x-90">Update output vector file, overwrite existing</span>
<span 
class="ptmr7t-x-x-90">layer</span>                                                               </td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-50-28-"><td  style="white-space:wrap; text-align:left;" id="TBL-50-28-1"  
class="td11"><!--l. 4594--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span 
class="pcrr7tn-x-x-90">mode.vector.outmode</span><span 
class="pcrr7tn-x-x-90">&#x00A0;ulu</span></span></span>            </td><td  style="white-space:nowrap; text-align:left;" id="TBL-50-28-2"  
class="td11"><span 
class="ptmri7t-x-x-90">Choice                 </span></td><td  style="white-space:wrap; text-align:left;" id="TBL-50-28-3"  
class="td11"><!--l. 4594--><p class="noindent" ><span 
class="ptmr7t-x-x-90">Update  output  vector  file,  update  existing</span>
<span 
class="ptmr7t-x-x-90">layer</span>                                                               </td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-50-29-"><td  style="white-space:wrap; text-align:left;" id="TBL-50-29-1"  
class="td11"><!--l. 4595--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span 
class="pcrr7tn-x-x-90">mode.vector.inmask</span></span></span>                 </td><td  style="white-space:nowrap; text-align:left;" id="TBL-50-29-2"  
class="td11"><span 
class="ptmr7t-x-x-90">Input image         </span></td><td  style="white-space:wrap; text-align:left;" id="TBL-50-29-3"  
class="td11"><!--l. 4595--><p class="noindent" ><span 
class="ptmr7t-x-x-90">Mask Image</span>                                                   </td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-50-30-"><td  style="white-space:wrap; text-align:left;" id="TBL-50-30-1"  
class="td11"><!--l. 4596--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span 
class="pcrr7tn-x-x-90">mode.vector.neighbor</span></span></span>               </td><td  style="white-space:nowrap; text-align:left;" id="TBL-50-30-2"  
class="td11"><span 
class="ptmr7t-x-x-90">Boolean               </span></td><td  style="white-space:wrap; text-align:left;" id="TBL-50-30-3"  
class="td11"><!--l. 4596--><p class="noindent" ><span 
class="ptmr7t-x-x-90">8-neighbor connectivity</span>                                </td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-50-31-"><td  style="white-space:wrap; text-align:left;" id="TBL-50-31-1"  
class="td11"><!--l. 4597--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span 
class="pcrr7tn-x-x-90">mode.vector.stitch</span></span></span>                 </td><td  style="white-space:nowrap; text-align:left;" id="TBL-50-31-2"  
class="td11"><span 
class="ptmr7t-x-x-90">Boolean               </span></td><td  style="white-space:wrap; text-align:left;" id="TBL-50-31-3"  
class="td11"><!--l. 4597--><p class="noindent" ><span 
class="ptmr7t-x-x-90">Stitch polygons</span>                                              </td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-50-32-"><td  style="white-space:wrap; text-align:left;" id="TBL-50-32-1"  
class="td11"><!--l. 4598--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span 
class="pcrr7tn-x-x-90">mode.vector.minsize</span></span></span>                </td><td  style="white-space:nowrap; text-align:left;" id="TBL-50-32-2"  
class="td11"><span 
class="ptmr7t-x-x-90">Int                        </span></td><td  style="white-space:wrap; text-align:left;" id="TBL-50-32-3"  
class="td11"><!--l. 4598--><p class="noindent" ><span 
class="ptmr7t-x-x-90">Minimum object size</span>                                     </td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-50-33-"><td  style="white-space:wrap; text-align:left;" id="TBL-50-33-1"  
class="td11"><!--l. 4599--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span 
class="pcrr7tn-x-x-90">mode.vector.simplify</span></span></span>               </td><td  style="white-space:nowrap; text-align:left;" id="TBL-50-33-2"  
class="td11"><span 
class="ptmr7t-x-x-90">Float                    </span></td><td  style="white-space:wrap; text-align:left;" id="TBL-50-33-3"  
class="td11"><!--l. 4599--><p class="noindent" ><span 
class="ptmr7t-x-x-90">Simplify polygons</span>                                         </td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-50-34-"><td  style="white-space:wrap; text-align:left;" id="TBL-50-34-1"  
class="td11"><!--l. 4600--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span 
class="pcrr7tn-x-x-90">mode.vector.layername</span></span></span>              </td><td  style="white-space:nowrap; text-align:left;" id="TBL-50-34-2"  
class="td11"><span 
class="ptmr7t-x-x-90">String                  </span></td><td  style="white-space:wrap; text-align:left;" id="TBL-50-34-3"  
class="td11"><!--l. 4600--><p class="noindent" ><span 
class="ptmr7t-x-x-90">Layer name</span>                                                    </td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-50-35-"><td  style="white-space:wrap; text-align:left;" id="TBL-50-35-1"  
class="td11"><!--l. 4601--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span 
class="pcrr7tn-x-x-90">mode.vector.fieldname</span></span></span>              </td><td  style="white-space:nowrap; text-align:left;" id="TBL-50-35-2"  
class="td11"><span 
class="ptmr7t-x-x-90">String                  </span></td><td  style="white-space:wrap; text-align:left;" id="TBL-50-35-3"  
class="td11"><!--l. 4601--><p class="noindent" ><span 
class="ptmr7t-x-x-90">Geometry index field name</span>                           </td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-50-36-"><td  style="white-space:wrap; text-align:left;" id="TBL-50-36-1"  
class="td11"><!--l. 4602--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span 
class="pcrr7tn-x-x-90">mode.vector.tilesize</span></span></span>               </td><td  style="white-space:nowrap; text-align:left;" id="TBL-50-36-2"  
class="td11"><span 
class="ptmr7t-x-x-90">Int                        </span></td><td  style="white-space:wrap; text-align:left;" id="TBL-50-36-3"  
class="td11"><!--l. 4602--><p class="noindent" ><span 
class="ptmr7t-x-x-90">Tiles size</span>                                                        </td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-50-37-"><td  style="white-space:wrap; text-align:left;" id="TBL-50-37-1"  
class="td11"><!--l. 4603--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span 
class="pcrr7tn-x-x-90">mode.vector.startlabel</span></span></span>             </td><td  style="white-space:nowrap; text-align:left;" id="TBL-50-37-2"  
class="td11"><span 
class="ptmr7t-x-x-90">Int                        </span></td><td  style="white-space:wrap; text-align:left;" id="TBL-50-37-3"  
class="td11"><!--l. 4603--><p class="noindent" ><span 
class="ptmr7t-x-x-90">Starting geometry index</span>                                </td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-50-38-"><td  style="white-space:wrap; text-align:left;" id="TBL-50-38-1"  
class="td11"><!--l. 4604--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span 
class="pcrr7tn-x-x-90">mode.vector.ogroptions</span></span></span>             </td><td  style="white-space:nowrap; text-align:left;" id="TBL-50-38-2"  
class="td11"><span 
class="ptmr7t-x-x-90">String list            </span></td><td  style="white-space:wrap; text-align:left;" id="TBL-50-38-3"  
class="td11"><!--l. 4604--><p class="noindent" ><span 
class="ptmr7t-x-x-90">OGR options for layer creation</span>                     </td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-50-39-"><td  style="white-space:wrap; text-align:left;" id="TBL-50-39-1"  
class="td11"><!--l. 4605--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span 
class="pcrr7tn-x-x-90">mode.raster.out</span></span></span>                    </td><td  style="white-space:nowrap; text-align:left;" id="TBL-50-39-2"  
class="td11"><span 
class="ptmr7t-x-x-90">Output image      </span></td><td  style="white-space:wrap; text-align:left;" id="TBL-50-39-3"  
class="td11"><!--l. 4605--><p class="noindent" ><span 
class="ptmr7t-x-x-90">Output labeled image</span>                                    </td>
</tr><tr 
class="hline"><td><hr></td><td><hr></td><td><hr></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-50-40-"><td  style="white-space:wrap; text-align:left;" id="TBL-50-40-1"  
class="td11">                                   </td></tr></table></div>
</div>
<br /> <div class="caption" 
><span class="id">Table&#x00A0;4.50: </span><span  
class="content">Parameters table for Segmentation.</span></div><!--tex4ht:label?: x112-60100150 -->
                                                                            
                                                                            
</div><hr class="endfloat" />
</div>
<!--l. 4611--><p class="noindent" ><span class="paragraphHead"><a 
 id="x112-6020004.9.3"></a><span 
class="ptmb7t-">Input Image</span></span>
The input image to segment
<!--l. 4613--><p class="noindent" ><span class="paragraphHead"><a 
 id="x112-6030004.9.3"></a><span 
class="ptmb7t-">Segmentation algorithm</span></span>
Choice of segmentation algorithm (mean-shift by default) Available choices are:
     <ul class="itemize1">
     <li class="itemize"><span 
class="ptmb7t-">Mean-Shift</span>: OTB implementation of the Mean-Shift algorithm (multi-threaded).
         <ul class="itemize2">
         <li class="itemize"><span 
class="ptmb7t-">Spatial radius:  </span>Spatial radius of the neighborhood.
         </li>
         <li class="itemize"><span 
class="ptmb7t-">Range radius:  </span>Range radius defining the radius (expressed in radiometry unit) in the
         multispectral space.
         </li>
         <li class="itemize"><span 
class="ptmb7t-">Mode  convergence  threshold:    </span>Algorithm  iterative  scheme  will  stop  if  mean-shift
         vector  is  below  this  threshold  or  if  iteration  number  reached  maximum  number  of
         iterations.
         </li>
         <li class="itemize"><span 
class="ptmb7t-">Maximum number of iterations:  </span>Algorithm iterative scheme will stop if convergence
         hasn&#8217;t been reached after the maximum number of iterations.
         </li>
         <li class="itemize"><span 
class="ptmb7t-">Minimum  region  size:   </span>Minimum  size  of  a  region  (in  pixel  unit)  in  segmentation.
         Smaller clusters will be merged to the neighboring cluster with the closest radiometry.
         If set to 0 no pruning is done.</li></ul>
     </li>
     <li class="itemize"><span 
class="ptmb7t-">Edison mean-shift</span>: Edison implementation of mean-shift algorithm, by its authors.
         <ul class="itemize2">
         <li class="itemize"><span 
class="ptmb7t-">Spatial radius:  </span>Spatial radius defining neighborhood.
         </li>
         <li class="itemize"><span 
class="ptmb7t-">Range radius:  </span>Range radius defining the radius (expressed in radiometry unit) in the
         multi-spectral space.
         </li>
         <li class="itemize"><span 
class="ptmb7t-">Minimum region size:  </span>Minimum size of a region in segmentation. Smaller clusters will
         be merged to the neighboring cluster with the closest radiometry.
                                                                            
                                                                            
         </li>
         <li class="itemize"><span 
class="ptmb7t-">Scale factor:   </span>Scaling of the image before processing. This is useful for images with
         narrow decimal ranges (like [0,1] for instance).</li></ul>
     </li>
     <li class="itemize"><span 
class="ptmb7t-">Connected components</span>: Simple pixel-based connected-components algorithm with a user-defined
     connection condition.
         <ul class="itemize2">
         <li class="itemize"><span 
class="ptmb7t-">Condition:   </span>User defined connection condition, written as a mathematical expression.
         Available  variables  are  p(i)b(i),  intensity_p(i)  and  distance  (example  of  expression  :
         distance <span 
class="cmmi-10">&#x003C;</span>10 )</li></ul>
     </li>
     <li class="itemize"><span 
class="ptmb7t-">Watershed</span>: The traditional watershed algorithm. The height function is the gradient magnitude of
     the amplitude (square root of the sum of squared bands).
         <ul class="itemize2">
         <li class="itemize"><span 
class="ptmb7t-">Depth Threshold:  </span>Depth threshold Units in percentage of the maximum depth in the
         image.
         </li>
         <li class="itemize"><span 
class="ptmb7t-">Flood Level:   </span>flood level for generating the merge tree from the initial segmentation
         (between 0 and 1)</li></ul>
     </li></ul>
<!--l. 4642--><p class="noindent" ><span class="paragraphHead"><a 
 id="x112-6040004.9.3"></a><span 
class="ptmb7t-">Processing mode</span></span>
Choice of processing mode, either raster or large-scale. Available choices are:
     <ul class="itemize1">
     <li class="itemize"><span 
class="ptmb7t-">Tile-based large-scale segmentation with vector output</span>: In this mode, the application will output a
     vector file or database, and process the input image piecewise. This allows to perform segmentation
     of very large images.
         <ul class="itemize2">
         <li class="itemize"><span 
class="ptmb7t-">Output vector file:  </span>The output vector file or database (name can be anything understood
         by OGR)
         </li>
         <li class="itemize"><span 
class="ptmb7t-">Writing mode for the output vector file:  </span>This allows to set the writing behaviour for
         the output vector file. Please note that the actual behaviour depends on the file format.
         </li>
         <li class="itemize"><span 
class="ptmb7t-">Mask Image:  </span>Only pixels whose mask value is strictly positive will be segmented.
                                                                            
                                                                            
         </li>
         <li class="itemize"><span 
class="ptmb7t-">8-neighbor connectivity:  </span>Activate 8-Neighborhood connectivity (default is 4).
         </li>
         <li class="itemize"><span 
class="ptmb7t-">Stitch polygons:  </span>Scan polygons on each side of tiles and stitch polygons which connect
         by more than one pixel.
         </li>
         <li class="itemize"><span 
class="ptmb7t-">Minimum object size:  </span>Objects whose size is below the minimum object size (area in
         pixels) will be ignored during vectorization.
         </li>
         <li class="itemize"><span 
class="ptmb7t-">Simplify polygons:  </span>Simplify polygons according to a given tolerance (in pixel). This
         option allows to reduce the size of the output file or database.
         </li>
         <li class="itemize"><span 
class="ptmb7t-">Layer name:  </span>Name of the layer in the vector file or database (default is Layer).
         </li>
         <li class="itemize"><span 
class="ptmb7t-">Geometry  index  field  name:   </span>Name  of  the  field  holding  the  geometry  index  in  the
         output vector file or database.
         </li>
         <li class="itemize"><span 
class="ptmb7t-">Tiles  size:   </span>User  defined  tiles  size  for  tile-based  segmentation.  Optimal  tile  size  is
         selected according to available RAM if null.
         </li>
         <li class="itemize"><span 
class="ptmb7t-">Starting geometry index:  </span>Starting value of the geometry index field
         </li>
         <li class="itemize"><span 
class="ptmb7t-">OGR  options  for  layer  creation:    </span>A  list  of  layer  creation  options  in  the  form
         KEY=VALUE  that  will  be  passed  directly  to  OGR  without  any  validity  checking.
         Options may depend on the file format, and can be found in OGR documentation.</li></ul>
     </li>
     <li class="itemize"><span 
class="ptmb7t-">Standard segmentation with labeled raster output</span>: In this mode, the application will output a
     standard labeled raster. This mode can not handle large data.
         <ul class="itemize2">
         <li class="itemize"><span 
class="ptmb7t-">Output labeled image:  </span>The output labeled image.</li></ul>
     </li></ul>
<!--l. 4667--><p class="noindent" >
<h5 class="subsubsectionHead"><a 
 id="x112-6050004.9.3"></a>Examples</h5>
                                                                            
                                                                            
<!--l. 4668--><p class="noindent" ><span class="paragraphHead"><a 
 id="x112-6060004.9.3"></a><span 
class="ptmb7t-">Example 1</span></span>
Example of use with vector mode and watershed segmentationTo run this example in command-line, use the
following: <!--l. 4670-->
<div class="lstlisting" id="listing-102"><span class="label"><a 
 id="x112-606001r1"></a></span><span 
class="pcrr7tn-x-x-70">otbcli_Segmentation</span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><span 
class="pcrr7tn-x-x-70">-</span><span 
class="pcrb7t-x-x-70">in</span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><span 
class="pcrr7tn-x-x-70">QB_Toulouse_Ortho_PAN</span><span 
class="pcrr7tn-x-x-70">.</span><span 
class="pcrr7tn-x-x-70">tif</span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><span 
class="pcrr7tn-x-x-70">-</span><span 
class="pcrr7tn-x-x-70">mode</span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><span 
class="pcrr7tn-x-x-70">vector</span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><span 
class="pcrr7tn-x-x-70">-</span><span 
class="pcrr7tn-x-x-70">mode</span><span 
class="pcrr7tn-x-x-70">.</span><span 
class="pcrr7tn-x-x-70">vector</span><span 
class="pcrr7tn-x-x-70">.</span><span 
class="pcrr7tn-x-x-70">out</span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><span 
class="pcrr7tn-x-x-70">SegmentationVector</span><span 
class="pcrr7tn-x-x-70">.</span><span 
class="pcrr7tn-x-x-70">sqlite</span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><span 
class="pcrr7tn-x-x-70">-</span><span 
class="pcrr7tn-x-x-70">filter</span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><span 
class="pcrr7tn-x-x-70">watershed</span>
</div>
<!--l. 4673--><p class="noindent" >To run this example from Python, use the following code snippet: <!--l. 4674-->
<div class="lstlisting" id="listing-103"><span class="label"><a 
 id="x112-606002r1"></a></span><span 
class="pcrro7t-x-x-70">#</span><span 
class="pcrro7t-x-x-70">!/</span><span 
class="pcrro7t-x-x-70">usr</span><span 
class="pcrro7t-x-x-70">/</span><span 
class="pcrro7t-x-x-70">bin</span><span 
class="pcrro7t-x-x-70">/</span><span 
class="pcrro7t-x-x-70">python</span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><br /><span class="label"><a 
 id="x112-606003r2"></a></span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><br /><span class="label"><a 
 id="x112-606004r3"></a></span><span 
class="pcrro7t-x-x-70">#</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">Import</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">the</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">otb</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">applications</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">package</span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><br /><span class="label"><a 
 id="x112-606005r4"></a></span><span 
class="pcrb7t-x-x-70">import</span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><span 
class="pcrr7tn-x-x-70">otbApplication</span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><br /><span class="label"><a 
 id="x112-606006r5"></a></span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><br /><span class="label"><a 
 id="x112-606007r6"></a></span><span 
class="pcrro7t-x-x-70">#</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">The</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">following</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">line</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">creates</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">an</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">instance</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">of</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">the</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">Segmentation</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">application</span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><br /><span class="label"><a 
 id="x112-606008r7"></a></span><span 
class="pcrr7tn-x-x-70">Segmentation</span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><span 
class="pcrr7tn-x-x-70">=</span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><span 
class="pcrr7tn-x-x-70">otbApplication</span><span 
class="pcrr7tn-x-x-70">.</span><span 
class="pcrr7tn-x-x-70">Registry</span><span 
class="pcrr7tn-x-x-70">.</span><span 
class="pcrr7tn-x-x-70">CreateApplication</span><span 
class="pcrr7tn-x-x-70">(</span><span 
class="pcrr7tn-x-x-70">"</span><span 
class="pcrr7tn-x-x-70">Segmentation</span><span 
class="pcrr7tn-x-x-70">"</span><span 
class="pcrr7tn-x-x-70">)</span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><br /><span class="label"><a 
 id="x112-606009r8"></a></span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><br /><span class="label"><a 
 id="x112-606010r9"></a></span><span 
class="pcrro7t-x-x-70">#</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">The</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">following</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">lines</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">set</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">all</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">the</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">application</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">parameters</span><span 
class="pcrro7t-x-x-70">:</span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><br /><span class="label"><a 
 id="x112-606011r10"></a></span><span 
class="pcrr7tn-x-x-70">Segmentation</span><span 
class="pcrr7tn-x-x-70">.</span><span 
class="pcrr7tn-x-x-70">SetParameterString</span><span 
class="pcrr7tn-x-x-70">(</span><span 
class="pcrr7tn-x-x-70">"</span><span 
class="pcrr7tn-x-x-70">in</span><span 
class="pcrr7tn-x-x-70">"</span><span 
class="pcrr7tn-x-x-70">,</span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><span 
class="pcrr7tn-x-x-70">"</span><span 
class="pcrr7tn-x-x-70">QB_Toulouse_Ortho_PAN</span><span 
class="pcrr7tn-x-x-70">.</span><span 
class="pcrr7tn-x-x-70">tif</span><span 
class="pcrr7tn-x-x-70">"</span><span 
class="pcrr7tn-x-x-70">)</span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><br /><span class="label"><a 
 id="x112-606012r11"></a></span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><br /><span class="label"><a 
 id="x112-606013r12"></a></span><span 
class="pcrr7tn-x-x-70">Segmentation</span><span 
class="pcrr7tn-x-x-70">.</span><span 
class="pcrr7tn-x-x-70">SetParameterString</span><span 
class="pcrr7tn-x-x-70">(</span><span 
class="pcrr7tn-x-x-70">"</span><span 
class="pcrr7tn-x-x-70">mode</span><span 
class="pcrr7tn-x-x-70">"</span><span 
class="pcrr7tn-x-x-70">,</span><span 
class="pcrr7tn-x-x-70">"</span><span 
class="pcrr7tn-x-x-70">vector</span><span 
class="pcrr7tn-x-x-70">"</span><span 
class="pcrr7tn-x-x-70">)</span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><br /><span class="label"><a 
 id="x112-606014r13"></a></span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><br /><span class="label"><a 
 id="x112-606015r14"></a></span><span 
class="pcrr7tn-x-x-70">Segmentation</span><span 
class="pcrr7tn-x-x-70">.</span><span 
class="pcrr7tn-x-x-70">SetParameterString</span><span 
class="pcrr7tn-x-x-70">(</span><span 
class="pcrr7tn-x-x-70">"</span><span 
class="pcrr7tn-x-x-70">mode</span><span 
class="pcrr7tn-x-x-70">.</span><span 
class="pcrr7tn-x-x-70">vector</span><span 
class="pcrr7tn-x-x-70">.</span><span 
class="pcrr7tn-x-x-70">out</span><span 
class="pcrr7tn-x-x-70">"</span><span 
class="pcrr7tn-x-x-70">,</span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><span 
class="pcrr7tn-x-x-70">"</span><span 
class="pcrr7tn-x-x-70">SegmentationVector</span><span 
class="pcrr7tn-x-x-70">.</span><span 
class="pcrr7tn-x-x-70">sqlite</span><span 
class="pcrr7tn-x-x-70">"</span><span 
class="pcrr7tn-x-x-70">)</span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><br /><span class="label"><a 
 id="x112-606016r15"></a></span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><br /><span class="label"><a 
 id="x112-606017r16"></a></span><span 
class="pcrr7tn-x-x-70">Segmentation</span><span 
class="pcrr7tn-x-x-70">.</span><span 
class="pcrr7tn-x-x-70">SetParameterString</span><span 
class="pcrr7tn-x-x-70">(</span><span 
class="pcrr7tn-x-x-70">"</span><span 
class="pcrr7tn-x-x-70">filter</span><span 
class="pcrr7tn-x-x-70">"</span><span 
class="pcrr7tn-x-x-70">,</span><span 
class="pcrr7tn-x-x-70">"</span><span 
class="pcrr7tn-x-x-70">watershed</span><span 
class="pcrr7tn-x-x-70">"</span><span 
class="pcrr7tn-x-x-70">)</span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><br /><span class="label"><a 
 id="x112-606018r17"></a></span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><br /><span class="label"><a 
 id="x112-606019r18"></a></span><span 
class="pcrro7t-x-x-70">#</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">The</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">following</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">line</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">execute</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">the</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">application</span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><br /><span class="label"><a 
 id="x112-606020r19"></a></span><span 
class="pcrr7tn-x-x-70">Segmentation</span><span 
class="pcrr7tn-x-x-70">.</span><span 
class="pcrr7tn-x-x-70">ExecuteAndWriteOutput</span><span 
class="pcrr7tn-x-x-70">()</span>
</div>
<!--l. 4695--><p class="noindent" ><span class="paragraphHead"><a 
 id="x112-6070004.9.3"></a><span 
class="ptmb7t-">Example 2</span></span>
Example of use with raster mode and mean-shift segmentationTo run this example in command-line, use the
following: <!--l. 4697-->
<div class="lstlisting" id="listing-104"><span class="label"><a 
 id="x112-607001r1"></a></span><span 
class="pcrr7tn-x-x-70">otbcli_Segmentation</span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><span 
class="pcrr7tn-x-x-70">-</span><span 
class="pcrb7t-x-x-70">in</span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><span 
class="pcrr7tn-x-x-70">QB_Toulouse_Ortho_PAN</span><span 
class="pcrr7tn-x-x-70">.</span><span 
class="pcrr7tn-x-x-70">tif</span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><span 
class="pcrr7tn-x-x-70">-</span><span 
class="pcrr7tn-x-x-70">mode</span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><span 
class="pcrr7tn-x-x-70">raster</span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><span 
class="pcrr7tn-x-x-70">-</span><span 
class="pcrr7tn-x-x-70">mode</span><span 
class="pcrr7tn-x-x-70">.</span><span 
class="pcrr7tn-x-x-70">raster</span><span 
class="pcrr7tn-x-x-70">.</span><span 
class="pcrr7tn-x-x-70">out</span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><span 
class="pcrr7tn-x-x-70">SegmentationRaster</span><span 
class="pcrr7tn-x-x-70">.</span><span 
class="pcrr7tn-x-x-70">tif</span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><span 
class="pcrr7tn-x-x-70">uint16</span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><span 
class="pcrr7tn-x-x-70">-</span><span 
class="pcrr7tn-x-x-70">filter</span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><span 
class="pcrr7tn-x-x-70">meanshift</span>
</div>
<!--l. 4700--><p class="noindent" >To run this example from Python, use the following code snippet: <!--l. 4701-->
<div class="lstlisting" id="listing-105"><span class="label"><a 
 id="x112-607002r1"></a></span><span 
class="pcrro7t-x-x-70">#</span><span 
class="pcrro7t-x-x-70">!/</span><span 
class="pcrro7t-x-x-70">usr</span><span 
class="pcrro7t-x-x-70">/</span><span 
class="pcrro7t-x-x-70">bin</span><span 
class="pcrro7t-x-x-70">/</span><span 
class="pcrro7t-x-x-70">python</span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><br /><span class="label"><a 
 id="x112-607003r2"></a></span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><br /><span class="label"><a 
 id="x112-607004r3"></a></span><span 
class="pcrro7t-x-x-70">#</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">Import</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">the</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">otb</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">applications</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">package</span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><br /><span class="label"><a 
 id="x112-607005r4"></a></span><span 
class="pcrb7t-x-x-70">import</span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><span 
class="pcrr7tn-x-x-70">otbApplication</span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><br /><span class="label"><a 
 id="x112-607006r5"></a></span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><br /><span class="label"><a 
 id="x112-607007r6"></a></span><span 
class="pcrro7t-x-x-70">#</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">The</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">following</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">line</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">creates</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">an</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">instance</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">of</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">the</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">Segmentation</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">application</span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><br /><span class="label"><a 
 id="x112-607008r7"></a></span><span 
class="pcrr7tn-x-x-70">Segmentation</span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><span 
class="pcrr7tn-x-x-70">=</span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><span 
class="pcrr7tn-x-x-70">otbApplication</span><span 
class="pcrr7tn-x-x-70">.</span><span 
class="pcrr7tn-x-x-70">Registry</span><span 
class="pcrr7tn-x-x-70">.</span><span 
class="pcrr7tn-x-x-70">CreateApplication</span><span 
class="pcrr7tn-x-x-70">(</span><span 
class="pcrr7tn-x-x-70">"</span><span 
class="pcrr7tn-x-x-70">Segmentation</span><span 
class="pcrr7tn-x-x-70">"</span><span 
class="pcrr7tn-x-x-70">)</span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><br /><span class="label"><a 
 id="x112-607009r8"></a></span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><br /><span class="label"><a 
 id="x112-607010r9"></a></span><span 
class="pcrro7t-x-x-70">#</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">The</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">following</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">lines</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">set</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">all</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">the</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">application</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">parameters</span><span 
class="pcrro7t-x-x-70">:</span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><br /><span class="label"><a 
 id="x112-607011r10"></a></span><span 
class="pcrr7tn-x-x-70">Segmentation</span><span 
class="pcrr7tn-x-x-70">.</span><span 
class="pcrr7tn-x-x-70">SetParameterString</span><span 
class="pcrr7tn-x-x-70">(</span><span 
class="pcrr7tn-x-x-70">"</span><span 
class="pcrr7tn-x-x-70">in</span><span 
class="pcrr7tn-x-x-70">"</span><span 
class="pcrr7tn-x-x-70">,</span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><span 
class="pcrr7tn-x-x-70">"</span><span 
class="pcrr7tn-x-x-70">QB_Toulouse_Ortho_PAN</span><span 
class="pcrr7tn-x-x-70">.</span><span 
class="pcrr7tn-x-x-70">tif</span><span 
class="pcrr7tn-x-x-70">"</span><span 
class="pcrr7tn-x-x-70">)</span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><br /><span class="label"><a 
 id="x112-607012r11"></a></span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><br /><span class="label"><a 
 id="x112-607013r12"></a></span><span 
class="pcrr7tn-x-x-70">Segmentation</span><span 
class="pcrr7tn-x-x-70">.</span><span 
class="pcrr7tn-x-x-70">SetParameterString</span><span 
class="pcrr7tn-x-x-70">(</span><span 
class="pcrr7tn-x-x-70">"</span><span 
class="pcrr7tn-x-x-70">mode</span><span 
class="pcrr7tn-x-x-70">"</span><span 
class="pcrr7tn-x-x-70">,</span><span 
class="pcrr7tn-x-x-70">"</span><span 
class="pcrr7tn-x-x-70">raster</span><span 
class="pcrr7tn-x-x-70">"</span><span 
class="pcrr7tn-x-x-70">)</span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><br /><span class="label"><a 
 id="x112-607014r13"></a></span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><br /><span class="label"><a 
 id="x112-607015r14"></a></span><span 
class="pcrr7tn-x-x-70">Segmentation</span><span 
class="pcrr7tn-x-x-70">.</span><span 
class="pcrr7tn-x-x-70">SetParameterString</span><span 
class="pcrr7tn-x-x-70">(</span><span 
class="pcrr7tn-x-x-70">"</span><span 
class="pcrr7tn-x-x-70">mode</span><span 
class="pcrr7tn-x-x-70">.</span><span 
class="pcrr7tn-x-x-70">raster</span><span 
class="pcrr7tn-x-x-70">.</span><span 
class="pcrr7tn-x-x-70">out</span><span 
class="pcrr7tn-x-x-70">"</span><span 
class="pcrr7tn-x-x-70">,</span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><span 
class="pcrr7tn-x-x-70">"</span><span 
class="pcrr7tn-x-x-70">SegmentationRaster</span><span 
class="pcrr7tn-x-x-70">.</span><span 
class="pcrr7tn-x-x-70">tif</span><span 
class="pcrr7tn-x-x-70">"</span><span 
class="pcrr7tn-x-x-70">)</span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><br /><span class="label"><a 
 id="x112-607016r15"></a></span><span 
class="pcrr7tn-x-x-70">Segmentation</span><span 
class="pcrr7tn-x-x-70">.</span><span 
class="pcrr7tn-x-x-70">SetParameterOutputImagePixelType</span><span 
class="pcrr7tn-x-x-70">(</span><span 
class="pcrr7tn-x-x-70">"</span><span 
class="pcrr7tn-x-x-70">mode</span><span 
class="pcrr7tn-x-x-70">.</span><span 
class="pcrr7tn-x-x-70">raster</span><span 
class="pcrr7tn-x-x-70">.</span><span 
class="pcrr7tn-x-x-70">out</span><span 
class="pcrr7tn-x-x-70">"</span><span 
class="pcrr7tn-x-x-70">,</span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><span 
class="pcrr7tn-x-x-70">3)</span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><br /><span class="label"><a 
 id="x112-607017r16"></a></span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><br /><span class="label"><a 
 id="x112-607018r17"></a></span><span 
class="pcrr7tn-x-x-70">Segmentation</span><span 
class="pcrr7tn-x-x-70">.</span><span 
class="pcrr7tn-x-x-70">SetParameterString</span><span 
class="pcrr7tn-x-x-70">(</span><span 
class="pcrr7tn-x-x-70">"</span><span 
class="pcrr7tn-x-x-70">filter</span><span 
class="pcrr7tn-x-x-70">"</span><span 
class="pcrr7tn-x-x-70">,</span><span 
class="pcrr7tn-x-x-70">"</span><span 
class="pcrr7tn-x-x-70">meanshift</span><span 
class="pcrr7tn-x-x-70">"</span><span 
class="pcrr7tn-x-x-70">)</span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><br /><span class="label"><a 
 id="x112-607019r18"></a></span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><br /><span class="label"><a 
 id="x112-607020r19"></a></span><span 
class="pcrro7t-x-x-70">#</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">The</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">following</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">line</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">execute</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">the</span><span 
class="pcrro7t-x-x-70">&#x00A0;</span><span 
class="pcrro7t-x-x-70">application</span><span 
class="pcrr7tn-x-x-70">&#x00A0;</span><br /><span class="label"><a 
 id="x112-607021r20"></a></span><span 
class="pcrr7tn-x-x-70">Segmentation</span><span 
class="pcrr7tn-x-x-70">.</span><span 
class="pcrr7tn-x-x-70">ExecuteAndWriteOutput</span><span 
class="pcrr7tn-x-x-70">()</span>
</div>
<!--l. 4723--><p class="noindent" >
<h5 class="subsubsectionHead"><a 
 id="x112-6080004.9.3"></a>Limitations</h5>
<!--l. 4724--><p class="noindent" >In raster mode, the application can not handle large input images. Stitching step of vector mode
might become slow with very large input images. MeanShift filter results depends on threads
number.
<h5 class="subsubsectionHead"><a 
 id="x112-6090004.9.3"></a>Authors</h5>
<!--l. 4726--><p class="noindent" >This application has been written by OTB-Team.
                                                                            
                                                                            
<h5 class="subsubsectionHead"><a 
 id="x112-6100004.9.3"></a>See also</h5>
<!--l. 4728--><p class="noindent" >These additional ressources can be useful for further information:
     <ul class="itemize1">
     <li class="itemize">MeanShiftSegmentation</li></ul>
<!--l. 4732-->
<!--l. 4732--><p class="noindent" ><a 
 id="tailCookBooksu84.html"></a>  
 <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> try { var pageTracker = _gat._getTracker("UA-7072990-1"); pageTracker._trackPageview(); } catch(err) {}</script></body></html> 
